<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>红旗渠干部学院教学管理系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
  <script type="text/javascript">
       function lo(){

  $("#myTabContent").removeClass("tab-content");}
  </script>
    <link rel="stylesheet" type="text/css" href="/Public/lib/bootstrap/css/bootstrap.css">

    <link rel="stylesheet" type="text/css" href="/Public/stylesheets/theme.css">
    <link rel="stylesheet" href="/Public/lib/font-awesome/css/font-awesome.css">

    <script src="/Public/lib/jquery-1.7.2.min.js" type="text/javascript"></script>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #fff;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
        #ddxq1{
            
            display: none;
            
        }
        #ddxq2{
            
            display:block;
        }
       .navbar .brand {
            
           padding: 30px 60px;
            
            
        }
        .brand {
    font-family: 华文行楷;
   
}
.brand .second {
    color: #fff;
 font-weight: normal;
    font-size: 48px;

}
.hd{
   width:150px;
   height:20px;
   overflow:hidden;
    
}
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="/Public/lib/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class="" onload="lo()"> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    
                    <li><a href="javascript:void(0)" onclick="showinfo();" class="hidden-phone visible-tablet visible-desktop" role="button">修改密码</a></li>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i><?php echo (session('loginname')); ?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                           
                            <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">设置</a></li>
                            <li class="divider visible-phone"></li>
                            <li><a onclick="return confirm('您确定要退出吗？')" tabindex="-1" href="<?php echo U('Login/Logout');?>">退出</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="#"><span class="second">红旗渠干部学院教务管理系统</span></a>
        </div>
    </div>
    
<script language="javascript" type="text/javascript" src="/Public/My97DatePicker/WdatePicker.js"></script>
<style>
    hr {
        height: 1px;
        margin: 0 0 0 0;

    }

    /*#class {*/
        /*height: 30px;*/
        /*width: 100px;*/
    /*}*/

    td {
        line-height: 30px;

    }

</style>
<div class="sidebar-nav" style="width: 13%">
    <a href="<?php echo U('Index/Index2');?>" class="nav-header">
        <i class="icon-dashboard"></i>首页
    </a>
  <?php if(($_SESSION['userlevel']) != "6"): if($_SESSION['userlevel']!= '3'): if($_SESSION['userlevel']!= '4'): ?><a href="#bespeak-menu" class="nav-header collapsed" data-toggle="collapse">
            <i class="icon-edit"></i>预约<i class="icon-chevron-up"></i>
        </a>
        <if condition="$Think.const.CONTROLLER_NAME eq 'Bespeak'">
        <ul id="bespeak-menu" class="nav nav-list collapse in" >
            <?php else: ?>
        <ul id="bespeak-menu" class="nav nav-list collapse" ><?php endif; ?>
            <li ><a href="<?php echo U('Bespeak/Index');?>">预约管理</a></li>
        </ul><?php endif; ?>
        <?php if($_SESSION['userlevel']!= '5'): ?><a href="#accounts-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>档案管理<i class="icon-chevron-up"></i></a>
        <ul id="accounts-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Archives'): ?>in<?php endif; ?>">
            <li ><a href="<?php echo U('Archives/Teacher');?>">教师信息管理</a></li>
            <li ><a href="<?php echo U('Archives/Student');?>">学员信息管理</a></li>
        </ul>

        <a href="#error-menu" class="nav-header collapsed" data-toggle="collapse"><i class="icon-book"></i>班次信息<i class="icon-chevron-up"></i></a>
        <ul id="error-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Curriculum'): ?>in<?php endif; ?>">
            <li ><a href="<?php echo U('Curriculum/Classes');?>">班次信息管理</a></li>
            <li ><a href="<?php echo U('Curriculum/Currinfo');?>">课程信息管理</a></li>

        </ul><?php endif; ?>
   

    <?php if($_SESSION['userlevel']== '1'): ?><a href="#legal-menu" class="nav-header" data-toggle="collapse"><i class="icon-user"></i>用户管理<i class="icon-chevron-up"></i></a>
        <ul id="legal-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Useradmin'): ?>in<?php endif; ?>">
            <li ><a href="<?php echo U('Useradmin/Userinfo');?>">用户信息管理</a></li>

        </ul><?php endif; ?>

    <?php if($_SESSION['userlevel']!= '3'): ?><a href="#lb-menu" class="nav-header" data-toggle="collapse"><i class="icon-reorder"></i>类别管理<i class="icon-chevron-up"></i></a>
        <ul id="lb-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Category'): ?>in<?php endif; ?>">
            <li><a href="<?php echo U('Category/Classesadmin');?>">教室表管理</a></li>
            <li><a href="<?php echo U('Category/Addressadmin');?>">地区表管理</a></li>
            <li><a href="<?php echo U('Category/Studentadmin',array('lbq'=>10001));?>">学员类别管理</a></li>
            <li><a href="<?php echo U('Category/Studentadmin',array('lbq'=>10002));?>">课程名称管理</a></li>
            <li><a href="<?php echo U('Category/Studentadmin',array('lbq'=>10003));?>">班次类别管理</a></li>
        </ul>

        <a href="#dr-menu" class="nav-header" data-toggle="collapse"><i class="icon-magnet"></i>信息导入<i class="icon-chevron-up"></i></a>
        <ul id="dr-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Dr'): ?>in<?php endif; ?>">
            <li><a href="<?php echo U('Dr/Peixunadmin');?>">培训表导入</a></li>
            <li><a href="<?php echo U('Dr/PeixunList');?>">培训信息表管理</a></li>
        </ul><?php endif; ?>

    <?php if($_SESSION['userlevel']== '1'): ?><a href="#sql-menu" class="nav-header" data-toggle="collapse"><i class="icon-search"></i>SQL查询<i class="icon-chevron-up"></i></a>
        <ul id="sql-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Sql'): ?>in<?php endif; ?>">
            <li ><a href="<?php echo U('Sql/Sql');?>">SQL语句</a></li>
        </ul><?php endif; ?>

    <?php if($_SESSION['userlevel']== '1'): ?><a href="#log-menu" class="nav-header" data-toggle="collapse"><i class="icon-list-alt"></i>日志管理<i class="icon-chevron-up"></i></a>
        <ul id="log-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'Log'): ?>in<?php endif; ?>">
            <li ><a href="<?php echo U('Log/Index');?>">日志查询</a></li>
        </ul><?php endif; endif; ?>
    <a href="#gy-menu" class="nav-header" data-toggle="collapse"><i class="icon-th"></i>关于<i class="icon-chevron-up"></i></a>
    <ul id="gy-menu" class="nav nav-list collapse <?php if(CONTROLLER_NAME== 'About'): ?>in<?php endif; ?>">
        <li><a href="<?php echo U('About/Help');?>">使用帮助</a></li>
        <li><a href="<?php echo U('About/Version');?>">版本信息</a></li>
    </ul>
</div>


<div class="content">
    <div class="well well-sm" style="height:100px;">
        <ul class="nav nav-tabs">
            <li >
                <a href="javascript:void(0)" onclick="window.location.href='/index.php/Index/index2/fs/now.html'"
                                  data-toggle="tab">模式一</a>
            </li>
            <li class="active">
                <a href="javascript:void(0)" onclick="window.location.href='/index.php/Index/index'"
                   data-toggle="tab">模式二</a>
            </li>
        </ul>
        <form id="cx" name="cx" method="post">
            &nbsp;&nbsp;&nbsp;&nbsp;
            <lable>起止时间：</lable>
            <input type="text" name="start_time" onClick="WdatePicker()" placeholder="" style="width:120px">
            ~
            <input type="text" name="end_time" onClick="WdatePicker()" placeholder="" style="width:120px">


            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-primary" onclick="submit()">&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;
            </button>
        </form>
    </div>

    <div style="margin-left:50px;text-align:center">
        <div class="tb">
            <table width="90%" border="1">
                <tr>
                    <td width="80" align="center" nowrap="nowrap" bgcolor="#999999">日期</td>
                    <td width="56" align="center" nowrap="nowrap" bgcolor="#999999">午别</td>
                    <td width="192" align="center" nowrap="nowrap" bgcolor="#999999">班次</td>
                    <td width="192" align="center" nowrap="nowrap" bgcolor="#999999">课程</td>

                    <td width="100" align="center" nowrap="nowrap" bgcolor="#999999">教室</td>
                    <td width="100" align="center" nowrap="nowrap" bgcolor="#999999">带班老师</td>
                    <td width="100" align="center" nowrap="nowrap" bgcolor="#999999">接班老师</td>

                </tr>

                <?php if(is_array($sq)): $k = 0; $__LIST__ = $sq;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
                        <td rowspan="3" align="center"><p><?php echo ($key); ?></p>
                            <p>
                                <?php switch(date('w',strtotime($key))): case "1": ?>(星期一)<?php break;?>
                                    <?php case "2": ?>(星期二)<?php break;?>
                                    <?php case "3": ?>(星期三)<?php break;?>
                                    <?php case "4": ?>(星期四)<?php break;?>
                                    <?php case "5": ?>(星期五)<?php break;?>
                                    <?php case "6": ?>(星期六)<?php break;?>
                                    <?php case "0": ?>(星期日)<?php break;?>
                                    <?php default: ?>
                                    数据错误<?php endswitch;?>

                            </p>
                        </td>
                        <td align="center">上午</td>
                        <td align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '1') or ($vp['is_am2'] == '1')): ?><a
                                            href='javascript:void(0)' onclick="bcshow('<?php echo ($vp["schedule_id"]); ?>')"><?php echo ($vp['schename']); ?></a>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                        <td align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                            <!--<td>-->
                                    <?php if(($vp['is_am'] == '1') or ($vp['is_am2'] == '1')): ?><a
                                            href='javascript:void(0)'
                                            onclick="kcshow('<?php echo ($vp["coursename"]); ?>',<?php echo ($vp["id"]); ?>)"><?php echo ($vp['coursename']); ?></a>
                                        <hr/><?php endif; ?>
                            <!--</td>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                        <td height="20px">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '1') or ($vp['is_am2'] == '1')): ?><select name="class" id="class" onchange="saves(<?php echo ($vp['id']); ?>,this.value);">
                                            <?php if($vp['class'] == ''): ?><option value="0" selected="selected"></option>
                                                <?php else: ?>
                                                <option value="<?php echo ($vp['class']); ?>" selected="selected"><?php echo ($vp['class']); ?>
                                                </option><?php endif; ?>
                                            <?php if(is_array($class)): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vcl): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vcl["classname"]); ?>"><?php echo ($vcl["classname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                        <td  align="center" nowrap="nowrap" height="20px">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '1') or ($vp['is_am2'] == '1')): ?><select name="dteacher" id="dteacher"
                                                onchange="saves2(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                            <?php if($vp['dteacher'] == ''): ?><option value="0" selected="selected"></option>
                                                <?php else: ?>
                                                <option value="<?php echo ($vp['dteacher']); ?>" selected="selected">
                                                    <?php echo ($vp['dteacher']); ?>
                                                </option><?php endif; ?>
                                            <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>
                        <td  align="center" nowrap="nowrap" height="20px">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '1') or ($vp['is_am2'] == '1')): ?><select name="jteacher" id="jteacher"
                                                onchange="saves3(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                            <?php if($vp['jteacher'] == ''): ?><option value="0" selected="selected"></option>
                                                <?php else: ?>
                                                <option value="<?php echo ($vp['jteacher']); ?>" selected="selected">
                                                    <?php echo ($vp['jteacher']); ?>
                                                </option><?php endif; ?>
                                            <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                    </tr>
                    <tr>
                        <td align="center" height="38">下午</td>
                        <td align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '2') or ($vp['is_am2'] == '2')): ?><a
                                            href='javascript:void(0)' onclick="bcshow('<?php echo ($vp["schedule_id"]); ?>')"><?php echo ($vp['schename']); ?></a>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>
                        <td align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '2') or ($vp['is_am2'] == '2')): ?><a
                                            href='javascript:void(0)'
                                            onclick="kcshow('<?php echo ($vp["coursename"]); ?>',<?php echo ($vp["id"]); ?>)"><?php echo ($vp['coursename']); ?></a>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                        <td height="35" align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '2') or ($vp['is_am2'] == '2')): ?><select name="class"
                                                                                                            id="class"
                                                                                                            onchange="saves(<?php echo ($vp['id']); ?>,this.value);">
                                        <?php if($vp['class'] == ''): ?><option value="" selected="selected"></option>
                                            <?php else: ?>
                                            <option value="<?php echo ($vp['class']); ?>" selected="selected"><?php echo ($vp['class']); ?></option><?php endif; ?>
                                        <?php if(is_array($class)): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vcl): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vcl["classname"]); ?>"><?php echo ($vcl["classname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>
                        <td height="35" align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '2') or ($vp['is_am2'] == '2')): ?><select name="dteacher" id="dteacher"
                                                onchange="saves2(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                            <?php if($vp['dteacher'] == ''): ?><option value="0" selected="selected"></option>
                                                <?php else: ?>
                                                <option value="<?php echo ($vp['dteacher']); ?>" selected="selected">
                                                    <?php echo ($vp['dteacher']); ?>
                                                </option><?php endif; ?>
                                            <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>

                        <td height="35" align="center" nowrap="nowrap">
                            <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                    <?php if(($vp['is_am'] == '2') or ($vp['is_am2'] == '2')): ?><select name="jteacher" id="jteacher"
                                                onchange="saves3(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                            <?php if($vp['jteacher'] == ''): ?><option value="0" selected="selected"></option>
                                                <?php else: ?>
                                                <option value="<?php echo ($vp['jteacher']); ?>" selected="selected">
                                                    <?php echo ($vp['jteacher']); ?>
                                                </option><?php endif; ?>
                                            <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                        <hr/><?php endif; ?>
                                <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>
                    </tr>
                    <td align="center" height="38">晚上</td>
                    <td align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                <?php if(($vp['is_am'] == '3') or ($vp['is_am2'] == '3')): ?><a
                                        href='javascript:void(0)'
                                        onclick="bcshow('<?php echo ($vp["schedule_id"]); ?>')"><?php echo ($vp['schename']); ?></a>
                                    <hr/><?php endif; ?>
                            <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>
                    <td align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                <?php if(($vp['is_am'] == '3') or ($vp['is_am2'] == '3')): ?><a
                                        href='javascript:void(0)' onclick="kcshow('<?php echo ($vp["coursename"]); ?>',<?php echo ($vp["id"]); ?>)"><?php echo ($vp['coursename']); ?></a>
                                    <hr/><?php endif; ?>
                            <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>

                    <td height="35" align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                <?php if(($vp['is_am'] == '3') or ($vp['is_am2'] == '3')): ?><select name="class"
                                                                                                        id="class"
                                                                                                        onchange="saves(<?php echo ($vp['id']); ?>,this.value);">
                                    <?php if($vp['class'] == ''): ?><option value="" selected="selected"></option>
                                        <?php else: ?>
                                        <option value="<?php echo ($vp['class']); ?>" selected="selected"><?php echo ($vp['class']); ?></option><?php endif; ?>
                                    <?php if(is_array($class)): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vcl): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vcl["classname"]); ?>"><?php echo ($vcl["classname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                </select>
                                    <hr/><?php endif; ?>
                            <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>
                    <td height="35" align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                <?php if(($vp['is_am'] == '3') or ($vp['is_am2'] == '3')): ?><select name="dteacher" id="dteacher"
                                            onchange="saves2(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                        <?php if($vp['dteacher'] == ''): ?><option value="0" selected="selected"></option>
                                            <?php else: ?>
                                            <option value="<?php echo ($vp['dteacher']); ?>" selected="selected"><?php echo ($vp['dteacher']); ?>
                                            </option><?php endif; ?>
                                        <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <hr/><?php endif; ?>
                            <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>

                    <td height="35" align="center" nowrap="nowrap">
                        <?php if(is_array($vo)): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vp): $mod = ($i % 2 );++$i;?><!--<p>-->
                                <?php if(($vp['is_am'] == '3') or ($vp['is_am2'] == '3')): ?><select name="jteacher" id="jteacher"
                                            onchange="saves3(<?php echo ($vp['courseid']); ?>,this.value);" style="width:100px">
                                        <?php if($vp['jteacher'] == ''): ?><option value="0" selected="selected"></option>
                                            <?php else: ?>
                                            <option value="<?php echo ($vp['jteacher']); ?>" selected="selected"><?php echo ($vp['jteacher']); ?>
                                            </option><?php endif; ?>
                                        <?php if(is_array($teacher)): $i = 0; $__LIST__ = $teacher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vc2): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vc2["tname"]); ?>"><?php echo ($vc2["tname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <hr/><?php endif; ?>
                            <!--</p>--><?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>
                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </table>
        </div>


    </div>
    <br/>
    <div style='text-align:center'>
        <?php if($sd != ''): ?><div>
                <a href="<?php echo U('Index/index',array('fs'=>'up','sd'=>$sd));?>">
                    <button type="button" class="btn btn-default btn-lg">上一周</button>
                </a>
                &nbsp;&nbsp;| &nbsp;&nbsp;
                <a href="<?php echo U('Index/index',array('fs'=>'now'));?>">
                    <button type="button" class="btn btn-default btn-lg">本周</button>
                </a>
                    &nbsp;&nbsp;|&nbsp;&nbsp;
                <a href="<?php echo U('Index/index',array('fs'=>'down','sd'=>$sd));?>">
                    <button type="button" class="btn btn-default btn-lg">下一周</button>
                </a>

            </div><?php endif; ?>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">


            <div class="row-fluid">

                <div class="alert alert-info">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <h4>Ver:</h4> 1.0.0
                </div>
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close"
                                        data-dismiss="modal" aria-hidden="true">
                                    &times;
                                </button>
                                <h4 class="modal-title" id="myModalLabel">
                                    课程信息
                                </h4>
                            </div>
                            <div>
                                <div id='listsp'></div>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>
                <div class="modal fade" id="myModal2" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close"
                                        data-dismiss="modal" aria-hidden="true">
                                    &times;
                                </button>
                                <h4 class="modal-title" id="myModalLabel">

                                </h4>
                            </div>
                            <div>
                                <div id='listsp2'></div>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>
            </div>
            <script type="text/javascript">
                function saves(id, value) {
                    $.ajax({
                        type: "POST",
                        url: "/index.php/Index/saveclass",

                        cache: false,
                        data: {
                            id: id,
                            value: value

                        },

                        success: function (data) {
                            window.location.reload();
                        }

                    });


                }

                function saves2(id, value) {
                    $.ajax({
                        type: "POST",
                        url: "/index.php/Index/savedteacher",

                        cache: false,
                        data: {
                            id: id,
                            value: value

                        },

                        success: function (data) {
                            window.location.reload();
                        }

                    });


                }

                function saves3(id, value) {
                    $.ajax({
                        type: "POST",
                        url: "/index.php/Index/savejteacher",

                        cache: false,
                        data: {
                            id: id,
                            value: value

                        },

                        success: function (data) {
                            window.location.reload();
                        }

                    });


                }

                function kcshow(bcbh, bh) {
                    $.ajax({
                        type: "POST",
                        url: "/index.php/Index/kcshow",

                        cache: false,
                        data: {
                            kcname: bcbh,
                            bh: bh

                        },

                        success: function (data) {

                            $('#listsp').html(data);
                            $('#myModal').modal('show');
                            $('#myModal').modal().css({
                                width: '1000px',
                                height: '500px',
                                'margin-left': function () {
                                    return -($(this).width() / 2);
                                }
                            });
                        }


                    });


                }

                function bcshow(bcbh) {
                    // alert(bcbh);exit;
                    $.ajax({
                        type: "POST",
                        url: "/index.php/Index/bcshow",

                        cache: false,
                        data: {
                            bcmc: bcbh

                        },

                        success: function (data) {

                            $('#listsp2').html(data);
                            $('#myModal2').modal('show');
                            $('#myModal2').modal().css({
                                width: '1000px',
                                height: '500px',
                                'margin-left': function () {
                                    return -($(this).width() / 2);
                                }
                            });
                        }


                    })


                }
            </script>

              <footer>
                        <hr>

                        
                      

                        <p>copyright  &copy ;河南方正智慧城市信息发展有限公司版权所有</p>
                    </footer>
                    
            </div>
        </div>
    </div>
    
  <div class="modal fade" id="showinfo" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
              修改密码
            </h4>
         </div>
          <div>
              <div id='listsp' style="text-align:center">
                  <form class="form-horizontal" role="form" id="tab2">
    <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="text" class="form-control" id="loginname" name="loginname" value="<?php echo (session('loginname')); ?>" readonly="readonly">
      </div>
   </div>                   
   <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="opassword" name="opassword"
            placeholder="请输入原始密码">
      </div>
   </div>
                         <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="password" name="password"
            placeholder="请输入新密码">
      </div>
   </div>
   <div class="form-group">
      <label for="lastname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="password2" name="password2"
            placeholder="请确认新密码">
      </div>
   </div>

   <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
          <br />
         <button type="button" class="btn btn-default" onclick="tjxg()">修改密码</button>
      </div>
   </div>
</form>
              </div>
      </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>          
                <script>             
function showinfo(){

               
                 
  $('#showinfo').modal('show');
  $('#showinfo').modal().css({
    width: '300px',
    height:'300px',
    'margin-left': function () {
       return -($(this).width() / 2);
   }
});
                       }
    function tjxg(){
        var opassword=$('#opassword').val();
        var password=$('#password').val();
        var password2=$('#password2').val();

        if(password === password2){
          $.ajax({
                type: "POST",
                url: "<?php echo U('Index/xgmm');?>",
           
                cache: false,
                data: $('#tab2').serialize(),
         
                    success: function(data) {
                switch(data){
                           
                case '0':
                alert('修改成功');
                 window.location.href="<?php echo U('Login/logout');?>" ;
                break;
                case '1': 
                 alert('修改失败');
           
                break;
        case '3': 
                 alert('原始密码错误');
           
                break;
            default:
                alert(data);
        }
              
                       }
                    
        
        
        
        });
        }else{
            
            alert("两次输入的密码不一致");
        }
    
}  
function tz(){
    var pages=$('#pages').val();
    window.location.href="/index.php/Index/Index/p/"+pages+"";
    
    
}       
                                 
             
</script>

    <script src="/Public/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
    
  </body>
</html>